#pragma once
#include "EpilExpressionCodeBase.h"
#include "EpilOperator.h"


class EpilBinaryExpressionCode : public EpilExpressionCodeBase
{
	EPIL_CODE_DECL( BinaryExpression );

public:
	EpilBinaryExpressionCode( const EpilLexLocation & location );
	virtual ~EpilBinaryExpressionCode();

	EpilBinaryOperator					GetOperator() const									{ return m_operator; }
	void								SetOperator( EpilBinaryOperator op )				{ m_operator = op; }
	EpilExpressionCodeBase *			GetLeftExpression() const							{ return m_leftExpr; }
	void								SetLeftExpression( EpilExpressionCodeBase * expr )	{ m_leftExpr = expr; }
	EpilExpressionCodeBase *			GetRightExpression() const							{ return m_rightExpr; }
	void								SetRightExpression( EpilExpressionCodeBase * expr )	{ m_rightExpr = expr; }
	
	virtual tstring						ToEpilCode( int indent = 0 ) const;

private:
	EpilBinaryOperator					m_operator;
	EpilExpressionCodeBase *			m_leftExpr;
	EpilExpressionCodeBase *			m_rightExpr;
};